*****************************************************************************
*For:	"The White/Black Educational Gap, Stalled Progress, and the Long-term
*		Consequences of the Emergence of Crack Cocaine Markets"
*By: 	William N. Evans, Craig Garthwaite and Timothy J. Moore
*****************************************************************************

#delim cr
set more off
set varabbrev off
pause on
graph set ps logo off

capture log close
set linesize 200
set logtype text
log using ./educationresults.log , replace

clear all
estimates clear

***********************************************************
*** Figure 1 - High School Completion Rates by the Year ***
******* Each Cohort Turns Age 18 by Race and Sex, *********
**** 2000 Census Five-Percent Public Use Micro Sample *****
***********************************************************

* Get means by race, sex and cohort
use all_states_all_years_2000_pums.dta, clear
gen cohort=yearturn18
keep if cohort>=1965 & cohort<=1997
sort race cohort sex

**********************************************************
*** Rates for all, by race and cohort - Panels A and B ***
**********************************************************

* Means by race and cohort, including white-black difference
preserve
collapse hsgrad [aw=perwt], by(race cohort)
reshape wide hsgrad, i(cohort) j(race)
rename hsgrad1 hsgrad_white
rename hsgrad2 hsgrad_black
gen hsgrad_diff = hsgrad_white - hsgrad_black
export excel using means_by_race_all_states, replace
restore

********************************************************************
*** Rates for males/females, by race and cohort - Panels C and D ***
********************************************************************

* Means by sex, race and cohort, including white-black difference
preserve
collapse hsgrad [aw=perwt], by(race cohort sex)
tostring race, replace
reshape wide hsgrad, i(cohort) j(race sex)
rename hsgrad1 hsgrad_white
rename hsgrad2 hsgrad_black
gen hsgrad_diff = hsgrad_white - hsgrad_black
export excel using means_by_sex_race_all_states, replace
clear


*************************************************************************
********** Figure 3 - High School Completion Rates by the Year **********
******* Each Cohort Turns Age 18 and When Crack Cocaine Arrived, ********
*** By Race and Sex, 2000 Census Five-Percent Public Use Micro Sample ***
*************************************************************************

*************************************
*** MSA analysis - Panels A and B ***
*************************************

*** Data from 2000 5% PUMS organized for MSA analysis
use current_msa_2000.dta, clear
rename yearturn18 cohort
sort metaread /*MSA identifier*/
merge metaread using when_crack_arrives_msa_5_3_2012 /*Merged with MSA crack arrival dates*/
drop if crack_arrives==.

* HS graduation in relation to crack arrival
gen index=cohort-crack_arrives
keep if index>=-8 & index<=8
sort metaread sex race index 

collapse hsgrad [aw=perwt], by(race sex index)

*** Means for Panel A - Race differences for males
preserve 
keep if sex==1
drop sex
reshape wide hsgrad, i(index) j(race)
rename hsgrad1 hsgrad_white
rename hsgrad2 hsgrad_black
export excel using msa_hsgrad_male_byrace_crack_arrival, replace
restore

*** Means for Panel B - Race differences for females
preserve
keep if sex==2
drop sex
reshape wide hsgrad, i(index) j(race)
rename hsgrad1 hsgrad_white
rename hsgrad2 hsgrad_black
export excel using msa_hsgrad_female_byrace_crack_arrival, replace
restore


************************************************
*** State-of-birth analysis - Panels C and D ***
************************************************

*** Data from 2000 5% PUMS organized by state of birth
use sob_2000_pums.dta, clear
rename yearturn18 cohort
sort fips /*state identifier*/
merge fips using when_crack_arrives_5_3_2012 /*Merged with state crack arrival dates*/
drop if crack_arrives==.

* HS graduation in relation to crack arrival
gen index=cohort-crack_arrives
keep if index>=-8 & index<=8
sort fips sex race index 

collapse hsgrad [aw=perwt], by(race sex index)

*** Means for Panel C - Race differences for males
preserve 
keep if sex==1
drop sex
reshape wide hsgrad, i(index) j(race)
rename hsgrad1 hsgrad_white
rename hsgrad2 hsgrad_black
export excel using state_hsgrad_male_byrace_crack_arrival, replace
restore

*** Means for Panel D - Race differences for females
preserve
keep if sex==2
drop sex
reshape wide hsgrad, i(index) j(race)
rename hsgrad1 hsgrad_white
rename hsgrad2 hsgrad_black
export excel using state_hsgrad_female_byrace_crack_arrival, replace
restore


***********************************************************************
*** Table 4 Linear Probability Estimates of High School Completion, ***
************* Cohorts that Turned 18 from 1973-1998 *******************
***********************************************************************

*********************************
*** MSA analysis - Column (1) ***
*********************************

use current_msa_2000.dta, clear
rename yearturn18 cohort
sort metaread
merge metaread using when_crack_arrives_msa_5_3_2012
drop if crack_arrives==.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
replace indexn=0 if race==1
replace indexp=0 if race==1

gen aftercrack=index>=0 & race==2
drop if indext>8

gen cohortt=cohort-1972
gen cohorttb=cohortt*black
drop if cohort==1999

replace cohorttb=0 if black==1 & cohort>=crack_arrives

gen metaread_r=race+10*metaread

sort metaread race
by metaread race: egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore


***************************************
*** State of residence - Column (2) ***
***************************************

use cs_2000_ungrouped.dta, clear
rename yearturn18 cohort
sort fips
merge fips using when_crack_arrives_5_3_2012
keep if crack_arrives~=.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
gen aftercrack=index>=0&race==2

* delete any observations that occur;
* more than 8 years after crack arrives;
drop if indext>8
drop if cohort==1999
gen cohortt=cohort-1972
gen cohorttb=cohortt*black

gen fips_race=10*fips+race

* this model caps the cohort trend to the value that exists when crack arrives;
* this produces almost the exact same estimate on cohorttb but it dampens the;
* indexp results;

replace cohorttb=0 if black==1 & cohort>=crack_arrives

sort fips race
by fips race:  egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore


***********************************
*** State of birth - Column (3) ***
***********************************

use sob_2000_pums.dta, clear
rename yearturn18 cohort
sort fips
merge fips using when_crack_arrives_5_3_2012
keep if crack_arrives~=.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
gen aftercrack=index>=0&race==2

* delete any observations that occur;
* more than 8 years after crack arrives;
drop if indext>8
drop if cohort==1999
gen cohortt=cohort-1972
gen cohorttb=cohortt*black

gen fips_race=10*fips+race

* this model caps the cohort trend to the value that exists when crack arrives;
* this produces almost the exact same estimate on cohorttb but it dampens the;
* indexp results;

replace cohorttb=0 if black==1 & cohort>=crack_arrives

sort fips race
by fips race:  egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore


**********************************************************************
*** Table 5 OLS Estimates of Impact of Murder Rates on High School ***
********** Completion, Cohorts that Turned 18 from 1975-1998 *********
**********************************************************************

******************************************
*** MSA analysis - Columns (1) and (2) ***
******************************************

*adding an identifier for the core group of MSAs
use crosswalk_2.dta, clear
keep metaread
gen c=1
sort metaread
save crosswalk_2.dta, replace

use msa_2000_with_mr_fullset.dta, replace
sort metaread
merge metaread using crosswalk_2.dta
drop _merge

gen metaread_r=race+10*metaread
gen black=race==2

gen b_deathrate2024=black*deathrate2024
gen w_deathrate2024=(1-black)*deathrate2024
gen b_murderrate2024=black*murderrate2024
gen w_murderrate2024=(1-black)*murderrate2024

keep if yearturn18<=1998

*** results for males - 57 MSAs - column (1)
preserve
xi i.yearturn18 i.race
keep if c==1 
areg hsgrad _I* murderrate2024 if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & yearturn18==1983
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & yearturn18==1993
restore 

*** results for males - 176 MSAs - column (2)
preserve
xi i.yearturn18 i.race
areg hsgrad _I* murderrate2024 if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & yearturn18==1983
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & yearturn18==1993
restore 

*** results for females - 57 MSAs - column (1)
preserve
xi i.yearturn18 i.race
keep if c==1 
areg hsgrad _I* murderrate2024 if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
summ murderrate2024 [aw=perwt] if sex==2 & race==2 & yearturn18==1983
summ murderrate2024 [aw=perwt] if sex==2 & race==2 & yearturn18==1993
restore 

*** results for females - 176 MSAs - column (2)
preserve
xi i.yearturn18 i.race
areg hsgrad _I* murderrate2024 if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
summ murderrate2024 [aw=perwt] if sex==2 & race==2 & yearturn18==1983
summ murderrate2024 [aw=perwt] if sex==2 & race==2 & yearturn18==1993
restore 


************************************************
*** State of residence analysis - Column (3) ***
************************************************

use cs_2000_with_mr.dta, clear
gen fips_r=race+10*fips
gen black=race==2

gen b_murderrate2024=black*murderrate2024
gen w_murderrate2024=(1-black)*murderrate2024

keep if yearturn18<=1998

*** results for males 
preserve
xi i.yearturn18 i.race
areg hsgrad _I* murderrate2024 if sex==1 [aw=perwt], absorb(fips) cluster(fips)
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & yearturn18==1983
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & yearturn18==1993
restore 

*** results for females 
preserve
xi i.yearturn18 i.race
areg hsgrad _I* murderrate2024 if sex==2 [aw=perwt], absorb(fips) cluster(fips)
summ murderrate2024 [aw=perwt] if sex==2 & race==2 & yearturn18==1983
summ murderrate2024 [aw=perwt] if sex==2 & race==2 & yearturn18==1993
restore 


********************************************
*** State of birth analysis - Column (4) ***
********************************************

use sob_2000_with_mr.dta, clear
gen fips_r=race+10*fips
gen black=race==2

gen b_murderrate2024=black*murderrate2024
gen w_murderrate2024=(1-black)*murderrate2024

keep if yearturn18<=1998

*** results for males 
preserve
xi i.yearturn18 i.race
areg hsgrad _I* murderrate2024 if sex==1 [aw=perwt], absorb(fips) cluster(fips)
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & yearturn18==1983
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & yearturn18==1993
restore 

*** results for females 
preserve
xi i.yearturn18 i.race
areg hsgrad _I* murderrate2024 if sex==2 [aw=perwt], absorb(fips) cluster(fips)
summ murderrate2024 [aw=perwt] if sex==2 & race==2 & yearturn18==1983
summ murderrate2024 [aw=perwt] if sex==2 & race==2 & yearturn18==1993
restore 


*****************************************************************************
*** Table 6 OLS Estimates of the Impact of Murder and Prison Entry on the ***
*** Male High School Completion, Based on the Separate Impacts of Murder ****
************* and Prison, Cohorts that Turned 18 from 1983-1998 *************
*****************************************************************************

use sob_2000_with_mr.dta, clear
rename yearturn18 cohort

gen fips_r=race+10*fips
gen black=race==2

gen b_murderrate2024=black*murderrate2024
gen w_murderrate2024=(1-black)*murderrate2024

keep if cohort<=1998

gen cohortrace=cohort*10 + race

keep if sex==1

* merging in the prison intake rates;
sort fips cohort race
merge fips cohort race using intake_rates_clean.dta
tab _merge
keep if _merge==3
drop _merge
drop if intake_rate_20_24==.
drop if cohort==1999

* 15-state prison sample identifier
gen pris15=0
replace pris15=1 if fips==1|fips==6|fips==8|fips==17|fips==21|fips==24|fips==26| ///
	fips==27|fips==28|fips==29|fips==31|fips==41|fips==47|fips==54|fips==55


************* 15 states reporting intake every year **************

preserve
keep if pris15==1
* Fips, race, and cohort effects;
xi i.cohort i.race

*** Column (1) - murder rate only
areg hsgrad _I* murderrate2024 [aw=perwt], absorb(fips) cluster(fips)
* averages to calculate changes
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & cohort==1983
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & cohort==1993

*** Column (2) - prison rate only
areg hsgrad _I* intake_rate_20_24 [aw=perwt], absorb(fips) cluster(fips)
* averages to calculate changes
summ intake_rate_20_24 [aw=perwt] if sex==1 & race==2 & cohort==1983
summ intake_rate_20_24 [aw=perwt] if sex==1 & race==2 & cohort==1993

*** Column (3) - murder and prison together
areg hsgrad _I* murderrate2024 intake_rate_20_24 [aw=perwt], absorb(fips) cluster(fips)
restore



******************************************************************************
*** Table A3 Linear Probability Estimates of High School Graduation Models ***
******* when the Sample is Not Restricted to Eight Years after Crack, ********
***************** Cohorts that Turned 18 from 1973-1998 **********************
******************************************************************************

******************************************
*** MSA analysis - Columns (1) and (2) ***
******************************************

* Take column (1) results from Table 4, column (1).
* These results are for column (2).
use current_msa_2000.dta, clear
rename yearturn18 cohort
sort metaread
merge metaread using when_crack_arrives_msa_5_3_2012
drop if crack_arrives==.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
replace indexn=0 if race==1
replace indexp=0 if race==1

gen aftercrack=index>=0 & race==2

gen cohortt=cohort-1972
gen cohorttb=cohortt*black
drop if cohort==1999

replace cohorttb=0 if black==1 & cohort>=crack_arrives

gen metaread_r=race+10*metaread

sort metaread race
by metaread race: egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Column (2), Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Column (2), Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore

************************************************
*** State of residence - Columns (3) and (4) ***
************************************************

* Take column (3) results from Table 4, column (2).
* These results are for column (4).

use cs_2000_ungrouped.dta, clear
rename yearturn18 cohort
sort fips
merge fips using when_crack_arrives_5_3_2012
keep if crack_arrives~=.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
gen aftercrack=index>=0&race==2

drop if cohort==1999
gen cohortt=cohort-1972
gen cohorttb=cohortt*black

gen fips_race=10*fips+race

* this model caps the cohort trend to the value that exists when crack arrives;
* this produces almost the exact same estimate on cohorttb but it dampens the;
* indexp results;

replace cohorttb=0 if black==1 & cohort>=crack_arrives

sort fips race
by fips race:  egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore


********************************************
*** State of birth - Columns (5) and (6) ***
********************************************

* Take column (5) results from Table 4, column (3).
* These results are for column (6).

use sob_2000_pums.dta, clear
rename yearturn18 cohort
sort fips
merge fips using when_crack_arrives_5_3_2012
keep if crack_arrives~=.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
gen aftercrack=index>=0&race==2

drop if cohort==1999
gen cohortt=cohort-1972
gen cohorttb=cohortt*black

gen fips_race=10*fips+race

replace cohorttb=0 if black==1 & cohort>=crack_arrives

sort fips race
by fips race:  egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore


******************************************************************************
*** Table A4 Linear Probability Estimates of High School Graduation Models ***
********* without the South, Cohorts that Turned 18 from 1973-1998 ***********
******************************************************************************

******************************************
*** MSA analysis - Columns (1) and (2) ***
******************************************

use current_msa_2000.dta, clear
rename yearturn18 cohort
sort metaread
merge metaread using when_crack_arrives_msa_5_3_2012
drop if crack_arrives==.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
replace indexn=0 if race==1
replace indexp=0 if race==1

gen aftercrack=index>=0 & race==2
drop if indext>8

gen cohortt=cohort-1972
gen cohorttb=cohortt*black
drop if cohort==1999

replace cohorttb=0 if black==1 & cohort>=crack_arrives

gen metaread_r=race+10*metaread

sort metaread race
by metaread race: egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Identifying the Southern MSAs
gen south=0
replace south=1 if metaread==520|metaread==1000|metaread==1520|metaread==1920|metaread==2680| ///
 metaread==3120|metaread==4920|metaread==5000|metaread==5360|metaread==5560|metaread==5720|   ///
 metaread==5960|metaread==8280|metaread==8840|metaread==720|metaread==3360|metaread==4520|metaread==7240

*** Column (1), Non-Southern states, Panel A - males
preserve 
keep if south==0
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Column (2), Southern states, Panel A - males
preserve 
keep if south==1
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Column (1), Non-Southern states, Panel B - females
preserve 
keep if south==0
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore

*** Column (1), Southern states, Panel B - females
preserve 
keep if south==1
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore
 
 
************************************************
*** State of residence - Columns (3) and (4) ***
************************************************

use cs_2000_ungrouped.dta, clear
rename yearturn18 cohort
sort fips
merge fips using when_crack_arrives_5_3_2012
keep if crack_arrives~=.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
gen aftercrack=index>=0&race==2

* delete any observations that occur;
* more than 8 years after crack arrives;
drop if indext>8
drop if cohort==1999
gen cohortt=cohort-1972
gen cohorttb=cohortt*black

gen fips_race=10*fips+race

* this model caps the cohort trend to the value that exists when crack arrives;
* this produces almost the exact same estimate on cohorttb but it dampens the;
* indexp results;

replace cohorttb=0 if black==1 & cohort>=crack_arrives

sort fips race
by fips race:  egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Identifying the Southern states
gen south=0
replace south=1 if st=="TX"|st=="AL"|st=="AR"|st=="FL"|st=="GA"|st=="LA"|st=="MS"|st=="NC"|st=="SC"| ///
	st=="TN"|st=="VA"|st=="DE"|st=="KY"|st=="MD"|st=="TX"|st=="WV"

*** Column (3), Non-Southern states, Panel A - males
preserve 
keep if south==0
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Column (4), Southern states, Panel A - males
preserve 
keep if south==1
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Column (3), Non-Southern states, Panel B - females
preserve 
keep if south==0
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore

*** Column (4), Southern states, Panel B - females
preserve 
keep if south==1
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore
 
 
********************************************
*** State of birth - Columns (5) and (6) ***
********************************************

use sob_2000_pums.dta, clear
rename yearturn18 cohort
sort fips
merge fips using when_crack_arrives_5_3_2012
keep if crack_arrives~=.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
gen aftercrack=index>=0&race==2

* delete any observations that occur;
* more than 8 years after crack arrives;
drop if indext>8
drop if cohort==1999
gen cohortt=cohort-1972
gen cohorttb=cohortt*black

gen fips_race=10*fips+race

* this model caps the cohort trend to the value that exists when crack arrives;
* this produces almost the exact same estimate on cohorttb but it dampens the;
* indexp results;

replace cohorttb=0 if black==1 & cohort>=crack_arrives

sort fips race
by fips race:  egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Identifying the Southern states
gen south=0
replace south=1 if st=="TX"|st=="AL"|st=="AR"|st=="FL"|st=="GA"|st=="LA"|st=="MS"|st=="NC"|st=="SC"| ///
	st=="TN"|st=="VA"|st=="DE"|st=="KY"|st=="MD"|st=="TX"|st=="WV"

*** Column (5), Non-Southern states, Panel A - males
preserve 
keep if south==0
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Column (6), Southern states, Panel A - males
preserve 
keep if south==1
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Column (5), Non-Southern states, Panel B - females
preserve 
keep if south==0
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore

*** Column (6), Southern states, Panel B - females
preserve 
keep if south==1
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore
 
 
******************************************************************************
*** Table A5 Linear Probability Estimates of High School Graduation Models ***
************ when Controlling for Socioeconomic Characteristics, *************
*************** Cohorts that Turned 18, State of Birth Sample ****************
******************************************************************************

use sob_2000_pums.dta, clear
rename yearturn18 year
sort race fips year
merge m:1 race fips year using state_educ.dta
keep if _merge==3
drop _merge

sort fips race sex year
merge m:m fips race sex year using unemp_rate_race_sex_all.dta
drop _merge

sort fips year
merge m:1 fips year using state_demo_characteristics.dta
keep if _merge==3
drop _merge

sort race fips year
merge m:1 race fips year using mom_kids_state_march_cps_1.dta
keep if _merge==3
drop _merge

sort fips
merge fips using when_crack_arrives_5_3_2012
keep if crack_arrives~=.
drop _merge
rename year cohort

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
gen aftercrack=index>=0&race==2

* state models with fips, cohort and sex x race effects;
* three different murder rates;

* delete any observations that occur;
* more than 8 years after crack arrives;
drop if indext>8
drop if cohort==1999
drop if cohort<1976

gen cohortt=cohort-1975
gen cohorttb=cohortt*black

gen fips_race=10*fips+race

gen lnmedianincome=ln(medianfamincomer)

replace cohorttb=0 if black==1 & cohort>=crack_arrives

sort fips race
by fips race:  egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

* removing the missing values to make the values comparable
drop if manu_emp_percent==.
drop if mom_lths==.
drop if mom_hsgrad==.
drop if mom_somecollege==.
drop if fathernotpresent==.
drop if rexpp_co==.
drop if blackp==.
drop if racefrac==.
drop if faminc_gini==.
drop if unemp_rate==.

rename cohorttb black_precrack 
rename indexp black_postcrack
    
****************************** Males *******************************	
	
*** Column (1), Full sample, 1973-98
* Take results from Table 4, column (3).

*** Column (2), Restricted sample, 1976-98
preserve
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
restore

*** Column (3), Restricted sample with covariates, 1976-98
preserve
xi i.race i.cohort
areg hsgrad _I* manu_emp_percent mom_lths mom_hsgrad mom_somecollege	///
 fathernotpresent rexpp_co blackp racefrac faminc_gini unemp_rate		///
 black_precrack black_postcrack if sex==1 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
restore


****************************** Females *******************************	
	
*** Column (4), Full sample, 1973-98
* Take results from Table 4, column (3).

*** Column (5), Restricted sample, 1976-98
preserve
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
restore

*** Column (6), Restricted sample with covariates, 1976-98
preserve
xi i.race i.cohort
areg hsgrad _I* manu_emp_percent mom_lths mom_hsgrad mom_somecollege	///
 fathernotpresent rexpp_co blackp racefrac faminc_gini unemp_rate		///
 black_precrack black_postcrack if sex==2 [aw=perwt], absorb(fips) cluster(fips)
test black_precrack=black_postcrack
restore

 
******************************************************************************
*** Table A6 Linear Probability Estimates of High School Graduation Models ***
*********** using Various Measures of Crack Market Arrival in MSAs, **********  
***************** Cohorts that Turned 18 from 1973-1998 **********************
******************************************************************************

********************** Column (1) - Main results *****************************
* Take results from Table 4, column (1).

********* Column (2) - Cocaine-related deaths in two years of three **********
use current_msa_2000.dta, clear
rename yearturn18 cohort
sort metaread
merge metaread using multiple_arrival_dates_msa
gen crack_arrives=two_in_three
drop if crack_arrives==.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
replace indexn=0 if race==1
replace indexp=0 if race==1

gen aftercrack=index>=0 & race==2
drop if indext>8

gen cohortt=cohort-1972
gen cohorttb=cohortt*black
drop if cohort==1999

replace cohorttb=0 if black==1 & cohort>=crack_arrives

gen metaread_r=race+10*metaread

sort metaread race
by metaread race: egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore

*********** Column (3) - Cocaine-related deaths in three years in a row *************
use current_msa_2000.dta
rename yearturn18 cohort
sort metaread
merge metaread using multiple_arrival_dates_msa
gen crack_arrives=three_in_row
drop if crack_arrives==.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
replace indexn=0 if race==1
replace indexp=0 if race==1

gen aftercrack=index>=0 & race==2
drop if indext>8

gen cohortt=cohort-1972
gen cohorttb=cohortt*black
drop if cohort==1999

replace cohorttb=0 if black==1 & cohort>=crack_arrives

gen metaread_r=race+10*metaread

sort metaread race
by metaread race: egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore

****** Column (4) - Cocaine-related deaths using population-based threshold *********
use current_msa_2000.dta
rename yearturn18 cohort
sort metaread
merge metaread using multiple_arrival_dates_msa
gen crack_arrives=thresh_2m
drop if crack_arrives==.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
replace indexn=0 if race==1
replace indexp=0 if race==1

gen aftercrack=index>=0 & race==2
drop if indext>8

gen cohortt=cohort-1972
gen cohorttb=cohortt*black
drop if cohort==1999

replace cohorttb=0 if black==1 & cohort>=crack_arrives

gen metaread_r=race+10*metaread

sort metaread race
by metaread race: egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore

****************** Column (5) Drug arrests dates from Cork (1999) ********************
use current_msa_2000.dta
rename yearturn18 cohort
sort metaread
merge metaread using multiple_arrival_dates_msa
gen crack_arrives=drug_arrests
drop if crack_arrives==.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
replace indexn=0 if race==1
replace indexp=0 if race==1

gen aftercrack=index>=0 & race==2
drop if indext>8

gen cohortt=cohort-1972
gen cohorttb=cohortt*black
drop if cohort==1999

replace cohorttb=0 if black==1 & cohort>=crack_arrives

gen metaread_r=race+10*metaread

sort metaread race
by metaread race: egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore

****************** Column (6) Homicide arrests dates from Cork (1999) ********************
use current_msa_2000.dta
rename yearturn18 cohort
sort metaread
merge metaread using multiple_arrival_dates_msa
gen crack_arrives=murd_arrests
drop if crack_arrives==.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
replace indexn=0 if race==1
replace indexp=0 if race==1

gen aftercrack=index>=0 & race==2
drop if indext>8

gen cohortt=cohort-1972
gen cohorttb=cohortt*black
drop if cohort==1999

replace cohorttb=0 if black==1 & cohort>=crack_arrives

gen metaread_r=race+10*metaread

sort metaread race
by metaread race: egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore

********** Column (7) - Police survey dates from Grogger and Willis (2000) **********
use current_msa_2000.dta
rename yearturn18 cohort
sort metaread
merge metaread using multiple_arrival_dates_msa
gen crack_arrives=police
drop if crack_arrives==.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
replace indexn=0 if race==1
replace indexp=0 if race==1

gen aftercrack=index>=0 & race==2
drop if indext>8

gen cohortt=cohort-1972
gen cohorttb=cohortt*black
drop if cohort==1999

replace cohorttb=0 if black==1 & cohort>=crack_arrives

gen metaread_r=race+10*metaread

sort metaread race
by metaread race: egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore

*************** Column (8) - DAWN dates from Grogger and Willis (2000) ***************
use current_msa_2000.dta
rename yearturn18 cohort
sort metaread
merge metaread using multiple_arrival_dates_msa
gen crack_arrives=dawn
drop if crack_arrives==.

gen index=cohort-crack_arrives
gen indext=index
replace index=0 if race==1

gen black=race==2

gen pos=index>=0
gen neg=index<0
gen indexn=neg*index
gen indexp=pos*index
replace indexn=0 if race==1
replace indexp=0 if race==1

gen aftercrack=index>=0 & race==2
drop if indext>8

gen cohortt=cohort-1972
gen cohorttb=cohortt*black
drop if cohort==1999

replace cohorttb=0 if black==1 & cohort>=crack_arrives

gen metaread_r=race+10*metaread

sort metaread race
by metaread race: egen maxcohorttb=max(cohorttb)
replace cohorttb=maxcohorttb if black==1 & cohort>=crack_arrives

rename cohorttb black_precrack 
rename indexp black_postcrack

*** Panel A - males
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==1 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
summ hsgrad [aw=perwt] if sex==1 & index==-1 & race==2
restore

*** Panel B - females
preserve 
xi i.race i.cohort
areg hsgrad _I* black_precrack black_postcrack if sex==2 [aw=perwt], absorb(metaread) cluster(metaread)
test black_precrack=black_postcrack
*>Mean of dep. var. for blacks the year  before crack arrives
sum hsgrad [aw=perwt] if sex==2 & index==-1 & race==2, meanonly
restore


******************************************************************************
*** Table A& OLS Estimates of the Impact of Murder and Prison Entry on the ***
***** Male High School Completion, Cohorts that Turned 18 from 1983-1998 *****
******************************************************************************

use sob_2000_with_mr.dta, clear
rename yearturn18 cohort

gen fips_r=race+10*fips
gen black=race==2

gen b_murderrate2024=black*murderrate2024
gen w_murderrate2024=(1-black)*murderrate2024

keep if cohort<=1998

gen cohortrace=cohort*10 + race

keep if sex==1

* merging in the prison intake rates;
sort fips cohort race
merge fips cohort race using intake_rates_clean.dta
tab _merge
keep if _merge==3
drop _merge
drop if intake_rate_20_24==.
drop if cohort==1999

* 15-state prison sample identifier
gen pris15=0
replace pris15=1 if fips==1|fips==6|fips==8|fips==17|fips==21|fips==24|fips==26| ///
	fips==27|fips==28|fips==29|fips==31|fips==41|fips==47|fips==54|fips==55

* 7-state prison sample identifier
gen pris7=0
replace pris7=1 if fips==6|fips==8|fips==17|fips==26|fips==31|fips==55


************* Panel A: 15 states reporting intake every year **************

*** Take all of the results from Table 6


************* Panel B: 7 states reporting intake every year and better data **************

preserve
keep if pris7==1
* Fips, race, and cohort effects;
xi i.cohort i.race

*** Column (1) - murder rate only
areg hsgrad _I* murderrate2024 [aw=perwt], absorb(fips) cluster(fips)
* averages to calculate changes
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & cohort==1983
summ murderrate2024 [aw=perwt] if sex==1 & race==2 & cohort==1993

*** Column (2) - prison rate only
areg hsgrad _I* intake_rate_20_24 [aw=perwt], absorb(fips) cluster(fips)
* averages to calculate changes
summ intake_rate_20_24 [aw=perwt] if sex==1 & race==2 & cohort==1983
summ intake_rate_20_24 [aw=perwt] if sex==1 & race==2 & cohort==1993

*** Column (3) - murder and prison together
areg hsgrad _I* murderrate2024 intake_rate_20_24 [aw=perwt], absorb(fips) cluster(fips)
restore


log close
